#include "AnimationUnit.h"

string AnimationUnit::getName()
{
	return m_name;
}

void AnimationUnit::setName(const char* name)
{
	m_name = name;
}

ActionTimeline* AnimationUnit::getAction()
{
	return m_action;
}

void AnimationUnit::setAction(const char* actionFileName)
{
	m_action = CSLoader::createTimeline(actionFileName);
}

void AnimationUnit::setAction(ActionTimeline* action) 
{
	m_action = action;
}

string AnimationUnit::getMainCellName()
{
	return m_mainCellName;
}

void AnimationUnit::setMainCellName(const char* mainCellName)
{
	m_mainCellName = mainCellName;
}

list<AnimationCell> AnimationUnit::getAnimationCells()
{
	return m_animationCells;
}

void AnimationUnit::addAnimationCell(AnimationCell cell)
{
	m_animationCells.push_back(cell);
}

std::function<void()> AnimationUnit::getCallBackFunc()
{
	return m_callBackFunc;
}
void AnimationUnit::setCallBackFunc(std::function<void()> callBackFunc)
{
	m_callBackFunc = callBackFunc;
}

list<list<string>> AnimationUnit::getSounds()
{
	return m_sounds;
}

void AnimationUnit::setSounds(list<list<string>> sounds)
{
	m_sounds = sounds;
}

float AnimationUnit::getTimeout()
{
	return m_timeout;
}

void AnimationUnit::setTimeout(float timeout)
{
	m_timeout = timeout;
}

string AnimationUnit::getNextUnitName()
{
	return m_nextUnitName;
}

void AnimationUnit::setNextUnitName(string nextUnitName)
{
	m_nextUnitName = nextUnitName;
}

float AnimationUnit::getGivenTimeTotal()
{
	return m_givenTimeTotal;
}
void AnimationUnit::setGivenTimeTotal(float givenTimeTotal)
{
	m_givenTimeTotal = givenTimeTotal;
}

int AnimationUnit::getEndType()
{
	return m_endType;
}

void AnimationUnit::setEndType(int endType)
{
	m_endType = endType;
}